package com.xiaoyu.lanling.feature.im.request.flow

import com.xiaoyu.im.request.MessageRequest
import com.xiaoyu.im.request.flow.BaseFailureAction
import com.xiaoyu.lanling.feature.im.provider.CustomIMExceptionProcessor
import com.xiaoyu.lanling.feature.im.provider.MessageDataProvider

class FailureAction : BaseFailureAction() {

    companion object {
        const val CODE_COIN_NOT_ENOUGH = 20090
        const val CODE_COIN_NOT_ENOUGH_WITH_FIRST_CHARGE = 20091
    }

    override fun onFailure(request: MessageRequest) {
        super.onFailure(request)
        MessageDataProvider.instance.onMessageFail(request)
        CustomIMExceptionProcessor.process(request)
    }
}